#ifndef VEHGUI_H
#define VEHGUI_H
#include <osgEarthImGui/ImGuiPanel>
#include <osgViewer/Viewer>
#include <list>
#include <map>
#include <memory>
#include <mutex>


#include "equipnode.h"
#include "oeutils.h"

using namespace osgEarth::Util;


struct VehGUI : public ImGuiPanel
{
    osg::Group* node;
    osgViewer::Viewer* view;
    std::mutex map_lock;
    std::map<std::string, std::shared_ptr<EquipNode>> vehs;
    std::map<std::string, std::shared_ptr<EquipNode>>::iterator iter;

    VehGUI(osg::Group* pNode, osgViewer::Viewer* pView);
    void load(const Config& conf) override {}
    void save(Config& conf) override {}
    void draw(osg::RenderInfo& ri) override;
    bool insertVeh(const std::string& fName);

};

#endif // VEHGUI_H
